package fristphase.submarinegame08complete;

import javax.swing.*;

public class MineSubmarine extends SeaObject implements EnemyLife {
    public MineSubmarine(int index){
        super(60,19,index,"水雷潜艇");
    }
    public void move(){
        x += speed;
    }
    public ImageIcon getImage(){
        return Images.mineSubmarine;
    }
    public Mine shootMine(){
        int x = this.x + this.width;//水雷潜艇的坐标x+宽
        int y = this.y - 5;//水雷潜艇的坐标y-5
        return new Mine(x,y);
    }
    public int getLife(){
        return 1;
    }
}
